<?php
 
if (!defined('PDNSADMIN')) {
	header('HTTP/1.0 403 Forbidden');
	die;
}
 
$modules = array();

// The below libraries can be replaced with children that customise behavior
if(empty($set['dbtype'])){
      die("You must set 'dbtype' in settings.php");
}else{
      require_once $set['include_path'] . '/lib/' . $set['dbtype'] . '.php';
      $modules['database'] = 'db_' . $set['dbtype'];
}
require_once $set['include_path'] .  '/lib/perms.php';
$modules['permissions'] = 'permissions';
require_once $set['include_path'] .  '/lib/user.php';
$modules['user'] = 'user';
require_once $set['include_path'] .  '/lib/mailer.php';
$modules['mailer'] = 'mailer';
require_once $set['include_path'] . '/lib/htmlwidgets.php';
$modules['widgets'] = 'htmlwidgets';
require_once $set['include_path'] . '/lib/templater.php';
$modules['templater'] = 'templater';
require_once $set['include_path'] . '/lib/tool.php';
$modules['validator'] = 'tool';

// Other variables that we can allow addons to change
$modules['default_module'] = 'main';
$modules['default_admin_module'] = 'home';
$modules['public_modules'] = array(
	'cp',
	'domains',
	'email',
	'login',
	'users');

$modules['admin_modules'] = array(
	'backup',
	'groups',
	'Admin',
	'logs',
	'user_control',
	'optimize',
	'db_repair',
	'perms',
	'php_info',
	'query',
	'settings',
	'supermaster',
	'templates');

// These are generic enough that you shouldn't need to customise them
require_once $set['include_path'] . '/lib/xmlparser.php';
require_once $set['include_path'] . '/func/constants.php';
require_once $set['include_path'] . '/lib/globalfunctions.php';
?>
